<template>
	<view class="list-mine">
		<!-- 顶部个人信息 -->
		<view class="topMsg">
			<view class="topMsg-img">
				<image :src="userImg" mode=""></image>
			</view>
			<view class="topMsg-text">
				<view class="title">{{mineData.nickName}}</view>
				<view class="desc">{{mineData.desc == ""?"这家伙很懒，什么都没有留下！":mineData.desc}}</view>
			</view>
		</view>
		<!-- 菜单栏 -->
		<view class="middle-list">
			<view v-for="(item,index) in list" :key="index" class="middle-list-item" @click="listBtn(index)">
				<view class="item-text">{{item.title}}</view>
				<view class="item-icon"><u-icon name="arrow-right" color="#9d9e9e"></u-icon></view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		props:{
			mineData:Object,
			userImg:String
		},
		data() {
			return {
				list: [
					{title:"个人资料"},
					{title:"我的订单"},
					{title:"我的收藏"},
					{title:"地址管理"},
					{title:"安全中心"}
				],
			}
		},
		methods:{
			
			listBtn(index){
				let path = ""
				if(index == 0)path = "./childMine/myData/MyData"
				if(index == 1)path = "./childMine/myOrder/MyOrder"
				if(index == 2)path = "./childMine/myCollect/MyCollect"
				if(index == 3)path = "./childMine/myAddress/MyAddress"
				if(index == 4)path = "./childMine/safeCenter/SafeCenter"
				this.jumpPage(path)
			},
			jumpPage(path){
				uni.navigateTo({
					url:path
				})
			},
			
		}
	}
</script>

<style scoped>
	.list-mine{
		/* background-color: #000000; */
		width: 90%;
		margin: 0rpx 40rpx;
		position: relative;
		top: -100rpx;
		background-image: linear-gradient(rgba(255,255,255,.5) 100rpx,#FFFFFF,#FFFFFF);
	}
	.topMsg{
		width: 100%;
		display: flex;
		height: 200rpx;
	}
	.topMsg-img{
		width: 30%;
		height: 170rpx;
		padding: 20rpx 20rpx;
	}
	.topMsg-img>image{
		width: 100%;
		border-radius: 50% 50%;
		height: 100%;
	}
	.topMsg-text{
		width: 70%;
		padding: 20rpx 20rpx;
	}
	.topMsg-text>.title{
		color: #0C34BA;
		font-size: 40rpx;
	}
	.topMsg-text>.desc{
		margin-top: 30rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		height: 80rpx;
		color: #9d9e9e;
	}
	.middle-list{
		margin-top: 60rpx;
	}
	.middle-list-item{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0rpx 20rpx;
		height: 100rpx;
		border-bottom: 1rpx solid #eff0f0;
		
	}
</style>
